home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / varia / interp18.lha / interp-1.8 / input.cc < prev    next >
Text File  |  1990-01-19  |  3KB  |  88 lines

  1. // This is an input file for the interpreter.
  2. 2;
  3. double a;
  4. a = 3 ;
  5. print_value(2+4*5);
  6. print_value(4*atan(1.));
  7. syntaxof a = 3 ;
  8. while (a) a = a - 1 ;
  9. double b=1;
  10. syntaxof if (b) {a = -5.; while (a++) print_value (a);}
  11. sin(0.);
  12. a=2;
  13. a=3+4*8-2;
  14. print_value (4);
  15. print_value (a);
  16. 2.;
  17. print_value (sin(0.));
  18. double PI = 4*atan(1.);
  19. print_value (PI);
  20.                 // parameters:
  21. double cm =    .1 ;        // microfarads per square centimeter
  22. double fc =    96500.0 ;
  23. double taup =    10000.0 ;
  24. double volc =    4.0e-4 ;
  25. double voli =    2.5e-3 ;
  26. double mgi =    2.5 ;
  27. double nab =    110. ;
  28. double kb =    2.5 ;
  29. double cab =    2.5 ;
  30.                 // state variables:
  31.  
  32. double rint = .118;        // specific internal resistivity in Kohm-cm
  33. double rext = .070;        // specific extracellular resistivity in Kohm-cm
  34.  
  35. double a_radius = 0.00035;    // cell radius in cm
  36. double b_radius = 0.0003731;    // cleft (outer) radius in cm
  37.  
  38. double cell_length = .025 ;    // cell length in cm (250 microns)
  39. double specific_capacitance = 2;// cell capacitance in micro farads per cm^2
  40.                 // cell surface area in cm^2
  41. double cell_area = 2 * PI * a_radius * cell_length ;
  42. //cell_area = 5e-05;        // cell surface area in cm^2
  43.  
  44. double cavioli = 1 ;        // cell surface area correction factor
  45. double nodes_per_cell = 25;    // 
  46. print_value (nodes_per_cell);
  47.                 // spatial step size in cm
  48. double d_z = cell_length / nodes_per_cell;
  49.  
  50. double alphadt = 4.0 * PI * cavioli * (cm / nodes_per_cell) * d_z * d_z;
  51. double pi4dh2 = 4.0 * PI * cavioli * a_radius * d_z * d_z;
  52.  
  53.                 // pi4dh2  / cell_area
  54. print_value (pi4dh2  / cell_area) ;
  55.                 // 
  56.                 // set up the uniform properties of the strand.
  57. double r_i0 = rint / (PI * a_radius * a_radius);
  58. double r_o0 = rext / (PI * ((b_radius * b_radius) - (a_radius * a_radius)));
  59.  
  60. double r_d_series = 0.1;    // specific series resistance in ohms-cm^2
  61. double r_d_shunt = 1e+10;    // shunt resistance in Kohms
  62.  
  63.                 // .001 cooresponds to 1.8 Mohm disc resistance
  64. double junctional_area = .001;    // fractional area of the disc
  65.                 // disk resistances:
  66. double R1 = (rint * d_z / (PI * a_radius * a_radius)
  67.       + r_d_series * d_z / (junctional_area * cell_area)) / 2.0;
  68. double R2 = (rint * d_z / (PI * a_radius * a_radius)
  69.       + r_d_series * d_z / (junctional_area * cell_area)) / 2.0;
  70. double r = r_d_shunt;
  71. double Ro = rext * d_z/(2.*PI *((b_radius * b_radius) - (a_radius * a_radius)));
  72.  
  73.                 // transform the T-network to a pi-network
  74. double r1 = R2 + Ro + r + r * (R2 + Ro) / (R1 + Ro);
  75. double r2 = r + (R2 + Ro + r) * (R1 + Ro) / (R2 + Ro);
  76. double r3 = (R2 + Ro + r * (R1 + R2) / (R1 + Ro)) * (R1 + Ro) / r;
  77. double r4 = 2.0 * Ro;
  78. print_value (r1);
  79. print_value (r2);
  80. print_value (r3);
  81. print_value (r4);
  82.  
  83. print_table(0);
  84.  
  85. // Local variables:
  86. // compile-command: "make -k test"
  87. // End:
  88.